package com.weicx.wuzhiops.controller;

import com.weicx.wuzhiops.annotation.RestWrapper;
import com.weicx.wuzhiops.model.request.EventLogRequest;
import com.weicx.wuzhiops.model.wrapper.DataGrid;
import com.weicx.wuzhiops.service.UserEventLogService;
import com.weicx.wuzhiops.util.ServletsUtil;
import com.weicx.wuzhiops.vo.EventLogVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author:
 * @date: 2022-12-06 14:07:04
 * @since: 1.0
 */
@Api(value = "操作日志", tags = {"操作日志"})
@RestController
@RestWrapper
@RequestMapping(ServletsUtil.BASE_REQUEST_PATH_PREFIX + "/event/log")
public class EventLogController {

    @Resource
    private UserEventLogService userEventLogService;

    @PostMapping("/list")
    @ApiOperation(value = "获取操作日志列表")
    public DataGrid<EventLogVO> getLogList(@RequestBody EventLogRequest request) {
        return userEventLogService.listUserEventLog(request);
    }





}
